PrOpenPage
PrOpenPage Initialize to begin printing a page
#include <PrintTraps.h> Printing Manager
void PrOpenPage(pPrPort, rPgFrame );
TPPrPort pPrPort ; address of a TPrPort structure
Rect *rPgFrame ; address of a rectangle for scaling; 0=none
PrOpenPage initializes fields of a printing grafPort. Use it before using
any Quickdraw functions to draw on the page. The page will be printed only if
it falls within the page range given in the print record used in the previous
call to PrOpenDoc.
pPrPort is the address of a 178-byte TPrPort record. This must be a value
previously obtained via PrOpenDoc.
rPgFrame is the address of a rectangle to be used as the Quickdraw picture
frame used in scaling this page. Pass a NIL pointer (i.e., rPgFrame =
0) if you don't want the output to be scaled.
Returns: none; call PrError for result code.

Notes: PrOpenPage totally re- initializes the printing grafPort. Therefore, you
must set the font, font size, pen size, and so forth for each page in the
document.
Don't call OpenPicture from within a call to PrOpenPage.
PrOpenPage does it for you. If you call ClosePicture, any subsequent
drawing calls you make will not be added to the page. You can still make calls
to DrawPicture at any time.
The Printing Manager keeps track of the number of calls to PrOpenPage
and assumes that the first is for page 1, the second for page 2, etc. Pages
outside of the page range set in the print record used in the previous call to
PrOpenDoc will not be printed.
Thus, you can output all pages in a document and let the Printing Manager
"clip" the unwanted ones. However, this can be very slow. A better
approach is to start with the first page selected by the user in the
PrJobDialog call; e.g.:
PrJobDialog( hPrtRec ); /* let user select a range */
first = (*hPrtRec)-prJob.iFstPage; /* get real range from TPrint */
last = (*hPrtRec)-prJob.iLstPage;
(*hPrtRec)-prJob.iFstPage = 1; /* set a pretend range */
(*hPrtRec)-prJob.iLstPage = 9999;
for ( pgNum= first; pgNum
PrOpenPage( myPrtPort , 0 );
MyDrawPage( pgNum ); /* use Quickdraw commands to draw */
PrClosePage( myPrtPort );
}
Each call to PrOpenPage must be balanced by a subsequent call to